using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System;
public class UI_MainMenu : BaseUI
{
    public static string key = "UI_MainMenu";

    public Button ContinueBtn;

    private void Awake()
    {
        UIManager.showUIs?.Add(UI_MainMenu.key, this);
        //定义窗口性质 (默认数值)
        //窗口类型
        currentUIType.type = UIFormType.PopUp;
        //窗口所在节点
        currentUIType.mode = UIFormShowMode.HideOther;
        /// UI窗体透明度类型
        currentUIType.lucenyType = UIFormLucenyType.Lucency;

        EventMgr.Ins.AttachEvent("OnClickStartGame", OnClickStartGame);
        EventMgr.Ins.AttachEvent("OnClickContinue", OnClickContinue);
        EventMgr.Ins.AttachEvent("OnClickLoad", OnClickLoad);
        EventMgr.Ins.AttachEvent("OnClickSetting", OnClickSetting);
        EventMgr.Ins.AttachEvent("OnClickExit", OnClickExit);
        UIManager.UIPaths?.Add(UI_Setting.key, "UI_Setting");
        UIManager.UIPaths?.Add(UI_Load.key, "UI_Load");
    }

    public void Start()
    {
        if (true)
        {
            ContinueBtn.gameObject.SetActive(false);
        }
    }

    public void OnClickStartGame(object param = null)
    {

    }
    public void OnClickContinue(object param = null)
    {

    }
    public void OnClickLoad(object param = null)
    {

        UIManager.instance.ShowUI(UI_Load.key);
    }
    public void OnClickSetting(object param = null)
    {

        UIManager.instance.ShowUI(UI_Setting.key);
    }
    public void OnClickExit(object param = null)
    {
        Application.Quit();
    }

}
